import requests
import re
res =requests.get('http://zuihaodaxue.cn/zuihaodaxuepaiming2016.html')
res.encoding='utf-8'
html=res.text

# 移除字符串头尾指定的字符
col =re.findall("<tr.*?>(.*?)</tr>",html,re.M|re.S)
i = 1
for item in col:
    if i == 1:
        title = re.findall("<th.*?>(.*?)</th>",item)
        print(title)
    elif i<10:
        data=re.findall("<td.*?>(.*?)</td>",item,re.M|re.S)
        data[1]=data[1].strip('<div align="left"></div>')
        print(data[0:5])
    i=i+1

